home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power Programmierung
/
Power-Programmierung (Tewi)(1994).iso
/
magazine
/
pcmagazi
/
1992
/
04
/
msgbox.cpp
< prev
next >
Wrap
C/C++ Source or Header
|
1992-02-05
|
810b
|
39 lines
// msgbox.cpp RHS 11/25/91
#include<string.h>
#include"msgbox.h"
MsgBox::MsgBox(char *title, char *message, char *prompt)
{
int top, left, height, width;
if(Screen::Lines() > 25)
{
top = 17;
height = 10;
}
else
{
top = 8;
height = 10;
}
left = 10;
width = 60;
PopWin pop(title, MakePosition(top, left, height, width));
pop.Open();
if(strlen(message) > pop.Cols())
pop.AtSay(pop.Lines()/2,0,message,pop.GetColors());
else
pop.AtSay(pop.Lines()/2,(pop.Cols()-strlen(message))/2,
message,pop.GetColors());
pop.AtSay(pop.Lines()-1,0,prompt,pop.GetColors());
key = 0;
KeyBoard Key;
key = Key.Get();
pop.Close();
}